﻿<!DOCTYPE HTML>
<html>

<head>
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0,minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>我发布的</title>
    <link rel="stylesheet" href="/static/home/mobile/css/bootstrap.css">
  
    {include file='common/header'}
    <style type="text/css">

    
        .zhuanghu-tab li {
            width: 20%;
        }
        .task-list-remain-num span {
            width: 33.33%;
            float: left;
            text-align: center;
        }
        .paging {
            margin: 30px 0;
        }
        .dialog {
          position: fixed;
          left: 0;
          top: 0;
          z-index: 100001;
          width: 100%;
          height: 100%;
        }
        .dialog-content {
            width: 70%;
        }
        .dialog-overlay {
          position: absolute;
          top: 0;
          left: 0;
          z-index: 10002;
          width: 100%;
          height: 100%;
          background-color: rgba(0, 0, 0, 0.5);
        }
      .zhuanghu-tab li {
   			 width: 16.6%;
}

.modal.modal-in {
    opacity: 1;
    transition-duration: .4s;
    transform: translate3d(0,0,0) scale(1);
}


.modal {
    width: 340px;
    position: fixed;
    z-index: 1100;
    left: 50%;
    margin-left: -170px;
    margin-top: -170px;
    top: 50%;
    text-align: center;
    border-radius: 10px;
    opacity: 0;
    transform: translate3d(0,0,0) scale(1.185);
    transition-property: transform,opacity;
    color: #3d4145;
    display: block;
}

.modal-inner {
    padding: 20px;
    border-radius: 10px 10px 0 0;
    position: relative;
    background: #e8e8e8;
}
.modal-title {
    font-weight: 500;
    font-size: 16px;
    text-align: center;
}
.modal-title+.modal-text {
    margin-top: 5px;
}
.add_redpackets_modal>div {
    margin-top: 10px;
    font-size: 14px;
    line-height: 30px;
}

.row {
    overflow: hidden;
    margin-left: -4%;
}
.row .col-40 {
    width: 36%;
    margin-left: 4%;
}
.row .col-33 {
    width: 29.333333333333332%;
    margin-left: 4%;
}
input.modal-text-input {
    box-sizing: border-box;
    height: 30px;
    background: #fff;
    margin: 0;
    margin-top: 0px;
    padding: 0 10px;
    border: 1px solid #a0a0a0;
    border-radius: .25rem;
    width: 100%;
    font-size: 14px;
    font-family: inherit;
    display: block;
    box-shadow: 0 0 0 transparent;

}

.row .col-10 {
    width: 6%;
    margin-left: 4%;
}

.row>[class*=col-], .row>[class*=tablet-] {
    box-sizing: border-box;
    float: left;
}

.add_redpackets_modal .price_a, .add_redpackets_modal .price_b, .add_redpackets_modal .price_c {
    color: #ff6700;
    font-weight: bold;
}
.row .col-50 {
    width: 46%;
    margin-left: 4%;
}

.modal-buttons {
    height: 50px;
    overflow: hidden;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
}

.modal-button {
    width: 100%;
    padding: 0 10px;
    height: 50px;
    font-size: 18px;
    line-height: 50px;
    text-align: center;
    color: #0894ec;
    background: #e8e8e8;
    display: block;
    position: relative;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    cursor: pointer;
    box-sizing: border-box;
    -webkit-box-flex: 1;
    -ms-flex: 1;
}

.modal-button:first-child {
    border-radius: 0 0 0 10px;
}
.modal-button.modal-button-bold {
    font-weight: 500;
}

.modal-button:last-child {
    border-radius: 0 0 10px 0;
}

.modal-overlay.modal-overlay-visible, .popup-overlay.modal-overlay-visible, .preloader-indicator-overlay.modal-overlay-visible {
    visibility: visible;
    opacity: 1;
}
.modal-overlay, .popup-overlay, .preloader-indicator-overlay {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,.4);
    z-index: 10;
    visibility: hidden;
    opacity: 0;
    -webkit-transition-duration: .4s;
    transition-duration: .4s;
}

.view {
    display: inline-block;
    width: 20px;
    height: 16px;
    vertical-align: text-top;
    background: url(/static/home/mobile/images/reward_view.png?v=3);
    margin-right:10px;
    background-size: 100% 100%;
}

body{background:#111;}
.zhuanghu-tab li{background:#111;color:#fff;}
.zhuanghu-tab li.active{background:#111;color: #2F62FF;}
.zhuanghu-tab li:after, .zhuanghu-tab2 li:after{background:#666;}
.new-task-list ul li{background:#000;}
.new-task-list,.task-list,.paging{background:#111;}
span.task-title{color:#2F62FF !important}
.paging-selct{background:#2F62FF;color:#fff;}
    </style>
</head>

<body>
<div class="site-header header-fixed">
    <a onclick="history.back()" class="back"></a>
    <div class="tit-name">我发布的</div>
</div>
<div class="main Myrelease">
    <div class="zhuanghu-tab">
        <ul class="zh-tab-tit">
            <li id="all" class="{$category_type == 'all'?'active':''}" onclick="location.href='/home/mytask.html'">全部</li>
            <li id="wait" class="{$category_type == 'wait'?'active':''}" onclick="location.href='/home/mytask/category/t/wait.html'">待审核</li>
            <li id="ing" class="{$category_type == 'ing'?'active':''}" onclick="location.href='/home/mytask/category/t/ing.html'">进行中</li>
            <li id="pass" class="{$category_type == 'pass'?'active':''}" onclick="location.href='/home/mytask/category/t/pass.html'">已下架</li>
            <li id="past" class="{$category_type == 'past'?'active':''}" onclick="location.href='/home/mytask/category/t/past.html'">暂停中</li>
          <li id="past" class="{$category_type == 'refuse'?'active':''}" onclick="location.href='/home/mytask/category/t/refuse.html'">已拒绝</li>
        </ul>
    </div>
    <div class="task-list">
        {if !empty($tasks)}
        <div class="new-task-list">
            <ul>
                {include file='mytask/_list'}
            </ul>
        </div>
        <div class="task-del" style="display:none;">
            <a href="#" class="button4" onclick="MySaveTask.delSave()">删除(0)</a>
        </div>
        <div class="paging clearfix" style="display: block;">
            <span class="paging-prev">上一页</span>
            <span class="paging-num-total">
                    <select name="page" class="paging-selct" style="width:auto;padding:0px 10%;border-radius:10px;text-indent:0;">
                        {for start="1" end="$pageCount+1"}
                        <option value="{$i}">{$i}</option>
                        {/for}
                    </select>
                </span>
            <span class="paging-next" data-page="{$pageCount}">下一页</span>
            <form id="page_form">
                <input type="hidden" name="page" value="1">
            </form>
        </div>
        {/if}
    </div>
</div>



<div class="modal modal-in popup" style="display:none;">
	<div class="modal-inner">
		<div class="modal-title">发布悬赏红包</div>
			<div class="modal-text">
				    <div class="add_redpackets_modal">
				        <div class="row">
				          <div class="col-40 text-right">红包总额</div>
				          <div class="col-33"><input type="number" onchange="calc()" class="modal-text-input input unit_price" id="money" placeholder="最少1元"></div>
				          <div class="col-10">元</div>
				        </div>
				        <div class="row">
				          <div class="col-40 text-right">红包数量</div>
				          <div class="col-33"><input type="number" onchange="calc()" class="modal-text-input input number" id="number" placeholder="最少10"></div>
				          <div class="col-10">个</div>
				        </div>
				        <div>
				            扣除余额：<span class="price_a">0</span>
				            <div class="row">
					            <span class="tishi">任务结束后 剩余红包金额返回账户</span>
				            </div>
				        </div>
				    </div>
			</div>
		</div>

	<div class="modal-buttons ">
		<span class="modal-button" onclick="$('.popup').hide()">取消</span>
		<span class="modal-button modal-button-bold" onclick='send_redpackage()'>确定</span>
	</div>
</div>





<div class="modal modal-in see" style="display:none;">
	<div class="modal-inner">
		<div class="modal-title">发布浏览红包</div>
			<div class="modal-text">
				    <div class="add_redpackets_modal">
				        <div class="row">
				          <div class="col-40 text-right">红包单价</div>
				          <div class="col-33"><input type="number" onchange="calc_see()" class="modal-text-input input unit_price" id="see_money" placeholder="最少0.02元"></div>
				          <div class="col-10">元</div>
				        </div>
				        <div class="row">
				          <div class="col-40 text-right">红包数量</div>
				          <div class="col-33"><input type="number" onchange="calc_see()" class="modal-text-input input number" id="see_number" placeholder="最少500"></div>
				          <div class="col-10">个</div>
				        </div>
				        <div>
				            扣除余额：<span class="price_a">0</span>
				            <div class="row">
					            <span class="tishi">任务结束后 剩余红包金额返回账户</span>
				            </div>
				        </div>
				    </div>
			</div>
		</div>

	<div class="modal-buttons ">
		<span class="modal-button" onclick="$('.see').hide()">取消</span>
		<span class="modal-button modal-button-bold" onclick='send_see()'>确定</span>
	</div>
</div>




<div class="modal modal-in add_see" style="display:none;">
	<div class="modal-inner">
		<div class="modal-title">发布浏览红包</div>
			<div class="modal-text">
				    <div class="add_redpackets_modal">
				        <div class="row">
				          <div class="col-40 text-right">红包单价</div>
				          <div class="col-33"><input type="number" disabled  class="modal-text-input input unit_price" id="add_see_money"></div>
				          <div class="col-10">元</div>
				        </div>
				        <div class="row">
				          <div class="col-40 text-right">红包数量</div>
				          <div class="col-33"><input type="number" onchange="calc_add_see()" class="modal-text-input input number" id="add_see_number" placeholder="最少500"></div>
				          <div class="col-10">个</div>
				        </div>
				        <div>
				            扣除余额：<span class="add_price_a">0</span>
				            <div class="row">
					            <span class="tishi">任务结束后 剩余红包金额返回账户</span>
				            </div>
				        </div>
				    </div>
			</div>
		</div>

	<div class="modal-buttons ">
		<span class="modal-button" onclick="$('.add_see').hide()">取消</span>
		<span class="modal-button modal-button-bold" onclick='send_add_see()'>确定</span>
	</div>
</div>






<div class="modal-overlay modal-overlay-visible popup add_see" style="display:none;"></div>



<div class="modal-overlay modal-overlay-visible popup see" style="display:none;"></div>



<script type="text/javascript" src="/static/plugins/bootstrap/js/bootstrap.js"></script>
<script type="text/javascript" src="/static/home/mobile/js/bootbox.min.js"></script>
<script type="text/javascript">
var $setting_top_fee = '{$setting.top_fee}';
var $setting_top_max_hour = '{$setting.top_max_hour}';
</script>
<script type="text/javascript" src="/static/home/mobile/js/mytask.js?v=9"></script>

{include file='common/ufooter'}

<script>
	var task_id;
	function toggle_popup(tid){
		task_id=tid;
		$('.popup').show()
	}
	
	function toggle_see(tid){
		task_id=tid;
		$('.see').show()
	}
	
	function toggle_add_see(tid,money){
		task_id=tid;
		$('#add_see_money').val(money)
		$('.add_see').show()
	}
	
	//获取相关
function send_redpackage() {
	var number=$('#number').val()
	var money=$('#money').val()

	if(number<10){
		message('红包个数不能小于10','','error');
		return;
	}
	if(money<1){
		message('红包金额不能小于1','','error');
		return;
	}
    var loading = message('加载中','','loading');
    $.post(
        '/home/mytask/send_redpackage',
        {task_id:task_id,number:number,money:money},
        function (ret) {
            loading.close();
            message(ret.message,ret.redirect,ret.type)
        },'json'
    );
}



	//获取相关
function send_see() {
	var number=$('#see_number').val()
	var money=$('#see_money').val()

	if(number<500){
		message('红包个数不能小于500','','error');
		return;
	}
	if(money<0.02){
		message('单个红包金额不能小于0.02','','error');
		return;
	}
    var loading = message('加载中','','loading');
    $.post(
        '/home/mytask/send_see',
        {task_id:task_id,number:number,money:money},
        function (ret) {
            loading.close();
            message(ret.message,ret.redirect,ret.type)
        },'json'
    );
}


function send_add_see() {
	var number=$('#add_see_number').val()
	var money=$('#add_see_money').val()

	if(number<500){
		message('红包个数不能小于500','','error');
		return;
	}
	if(money<0.02){
		message('单个红包金额不能小于0.02','','error');
		return;
	}
    var loading = message('加载中','','loading');
    $.post(
        '/home/mytask/send_see',
        {task_id:task_id,number:number,money:money},
        function (ret) {
            loading.close();
            message(ret.message,ret.redirect,ret.type)
        },'json'
    );
}




function calc(){
		var number=$('#number').val()
	var money=$('#money').val()
	$('.price_a').html(money)
}

function calc_see(){
		var number=$('#see_number').val()
	var money=$('#see_money').val()
	$('.price_a').html(money*number)
}
function calc_add_see(){
		var number=$('#add_see_number').val()
	var money=$('#add_see_money').val()
	$('.add_price_a').html(money*number)
}
</script>
</body>
</html>